package com.turing.data.inner;

import com.turing.common.response.ResponseVO;
import com.turing.data.model.domain.fileTask.FileTaskVo;
import com.turing.data.vo.out.review.DrawTaskVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "draw", path = "fileTask")
public interface FileTaskInnerService {

    @PostMapping("queryParentTask")
    String queryParentTask(@RequestParam("parentTaskSn") String childTaskSn);

    @PostMapping("queryParentTaskVersion")
    Integer queryParentTaskVersion(@RequestParam("parentTaskSn") String parentTaskSn);

    @GetMapping("getTaskTemplate")
    String getTaskTemplate(@RequestParam("taskSn") String taskSn);


    @GetMapping("getTaskNameRes")
    public ResponseVO<String> getTaskNameRes(@RequestParam("parentTaskSn") String taskSn);

    @GetMapping("getElementRelations")
    List<Integer> getElementRelations(@RequestParam("id") int eleSn);

    @GetMapping("getChildTasks")
    List<DrawTaskVO> getChildTasks(@RequestParam("taskSn") String taskSn);


    /**
     * 根据draw_task_sn获取模板id列表
     *
     * @param drawTaskSn draw_sn
     * @return {@link ResponseVO}<{@link List}<{@link FileTaskVo}>>
     */
    @GetMapping("getTemplateIdsByDrawTaskSn")
    ResponseVO<List<FileTaskVo>> getTemplateIdListByDrawTaskSn(@RequestParam("drawTaskSn") String drawTaskSn);

}
